import { request, withCancelToken } from '@/utils/request'

const search = (data) => {
  return request('/search/all',{
    method: 'post',
    data
  })
}

const brand = (data) => {
  return request('/brand',{
    method: 'get',
    params: {
      ...data
    }
  })
}

const [ searchSend ] = withCancelToken(search)
const [ brandSend ] = withCancelToken(brand)

export { 
  searchSend,
  brandSend
}